#!/usr/bin/env bash

PACK_DIR=.test/nvim/pack/main/start

mkdir -p "$PACK_DIR"

if [ -d "$PACK_DIR/plenary.nvim" ]; then
  echo "plenary.nvim already exists"
else
  git clone https://github.com/nvim-lua/plenary.nvim.git "$PACK_DIR/plenary.nvim"
fi

if [ -d "$PACK_DIR/fennel.vim" ]; then
  echo "fennel.vim already exists"
else
  git clone https://github.com/bakpakin/fennel.vim.git "$PACK_DIR/fennel.vim"
fi

if [ -d "$PACK_DIR/aniseed" ]; then
  echo "aniseed already exists"
else
  git clone https://github.com/Olical/aniseed.git "$PACK_DIR/aniseed"
fi

if [ -d "$PACK_DIR/nfnl" ]; then
  echo "nfnl already exists"
else
  git clone https://github.com/Olical/nfnl.git "$PACK_DIR/nfnl"
fi

rm -f "$PACK_DIR/conjure"
ln -s "../../../../../" "$PACK_DIR/conjure"
